The Monty Python Method for Generating Gamma Variables
نویسندگان
چکیده
The Monty Python Method for generating random variables takes a decreasing density, cuts it into three pieces, then, using area-preserving transformations, folds it into a rectangle of area 1. A random point (x; y) from that rectangle is used to provide a variate from the given density, most of the time as x itself or a linear function of x. The decreasing density is usually the right half of a symmetric density. The Monty Python method has provided short and fast generators for normal, t and von Mises densities, requiring, on the average, from 1.5 to 1.8 uniform variables. In this article, we apply the method to non-symmetric densities, particularly the important gamma densities. We lose some of the speed and simplicity of the symmetric densities, but still get a method for variates that is simple and fast enough to provide beta variates in the form a=( a + b). We use an average of less than 1.7 uniform variates to produce a gamma variate whenever 1. Implementation is simpler and from three to five times as fast as a recent method reputed to be the best for changing ’s.
منابع مشابه
Design Flaws in the Implementation of the Ziggurat and Monty Python methods (and some remarks on Matlab randn)
Ziggurat and Monty Python are two fast and elegant methods proposed by Marsaglia and Tsang to transform uniform random variables to random variables with normal, exponential and other common probability distributions. While the proposed methods are theoretically correct, we show that there are various design flaws in the uniform pseudo random number generators (PRNG’s) of their published implem...
متن کاملEntwurf und Implementierung einer Programmiersprache im studentischen Projekt Monty's Coconut
class BinaryTree: + abstract height() class Branch inherits BinaryTree: BinaryTree left T value BinaryTree right + initializer(BinaryTree left, T value, BinaryTree right): self.left = left self.value = value self.right = right + height(): return 1+max(self.left.height(), self.right.height) class Leaf inherits BinaryTree: + height(): return 0 Beispiel 4: Ein Binärbaum ohne N...
متن کاملGenerating Antithetic Random Variates in Simulation of a Replacement Process by Rejection Method
When the times between renewals in a renewal process are not exponentially distributed, simulation can become a viable method of analysis. The renewal function is estimated through simulation for a renewal process simulation for a renewal process with gamma distributed renewal times and the shape parameter a > 1. Gamma random deviates will be generated by means of the so called Acceptance Rejec...
متن کاملReading Suggestions ( 2011 – 2012 )
Introductions to Philosophy There are many good introductions to philosophy: [22], [53] and [1] have the advantage of being short and cheap. There are a few books [44, 11, 34] that introduce philosophical ideas by analysing films which raise philosophical issues. One of the advantages of these books is that they allow you to say that you are doing valuable research for this module while watchin...
متن کاملReading Suggestions ( 2009 – 2010 )
Introductions to Philosophy There are many good introductions to philosophy: [21], [51] and [1] have the advantage of being short and cheap. There are a few books [42, 10, 33] that introduce philosophical ideas by analysing films which raise philosophical issues. One of the advantages of these books is that they allow you to say that you are doing valuable research for this module while watchin...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 1999